<template>
  <view class="goods2-wrap">
    <view class="goods2-box-image-area">
      <view class="goods2-box-image-box">
        <image class="goods2-box-image" :src="img"></image>
      </view>
    </view>
    <view class="goods2-box-label-area">
      <text class="goods2-box-price">￥{{price}}</text>
      <text class="goods2-box-label">{{label}}</text>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    img: {
      type: String,
      default: ''
    },
    label: {
      type: String,
      default: ''
    },
    price: {
      type: String,
      default: '0.00'
    }
  },
  data() {
    return {

    };
  },
  methods: {}
};
</script>

<style>
.goods2-wrap {
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
}
.goods2-box-image-area {
  width: 100%;
  height: 0;
  padding-bottom: 80%;
  position: relative;
}
.goods2-box-image-box {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
}
.goods2-box-image {
  width: 100%;
  height: 100%;
}
.goods2-box-label-area {
  height: 22px;
  display: flex;
}
.goods2-box-price {
  width: calc(100% - 40px);
  background-color: #fc4d52;
  color: #fff;
  line-height: 22px;
  font-size: 13px;
  padding-left: 3px;
  box-sizing: border-box;
}
.goods2-box-label {
  background-color: #ffe7c9;
  font-size: 12px;
  text-align: center;
  line-height: 22px;
  height: 22px;
  width: 40px;
}
</style>
